home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
turbovis
/
tvtoys04.zip
/
README.TXT
< prev
next >
Wrap
Text File
|
1993-12-18
|
32KB
|
829 lines
TVToys
Version 1.4
December 1993
Far Niente Productions
Contents ▄
▀▀▀▀▀▀▀▀▀▀▀▀▀
Introduction
Copyright
Short Description
Package File List
Instructions
Porting
Suggestions
Turbo Pascal 6.0 Users
Compatibility Testing
Coding Style
Protected Mode Information
Overlay Information
PC Video Modes
Video 7
The Improved Help File
Extended Video Mode Support Code
Custom Fonts
The NewMouse Unit
EXE Stream Unit
VideoModeChanged Variable
Changes
Credits
Author, Support, Info, Bugs etc
To Do List
Introduction ▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Welcome to TVToys!
This is a collection of useful stuff that should be available to all
Turbo Vision programmers. It is intended for Turbo Pascal 7.0 but would
be possible to port to TP6. The font, palette and video mode code can
be used in plain text mode without Turbo Vision.
THE SOURCE IS FREE AND COMES WITH NO WARRANTIES WHATSOEVER.
I hope that you will find this package useful. Have fun with it!
Copyright ▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀
You may use this package for free and pass it on to other persons as
long as you clearly state, in the header as well as in the code, all
changes made to the original code.
You may not pass along compiled versions of the source, except as
executable files.
You may also upload this package, unmodified, to bulletin boards or
other public access places.
There must be no charge associated with this package, though you may
include the unmodified package as a whole in shareware/freeware
compilations if only a nominal amount is charged for the compilation
disk.
I strongly urge people with money to spare to donate a small token
of appreciation in the $20 range. That's 5 campus meals for me.
Short Description ▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
This package includes:
An improved Help viewer with back tracking and the possibility to add
Contents and Index pages or whatever without recompiling HelpFile.
Extended video mode support. Code that determines what video modes are
available and presents a list for the user to choose from. Video7 and
VESA support included.
Custom fonts. Support for three different font file formats.
Palette routines. Change the EGA/VGA palette.
A mouse unit that limits the effects of buggy mouse drivers in extended
video modes.
Three demonstration programs, personal configuration files.
Lots of commented code, tried and tested.
Package File List ▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
The package consists of the following files:
TOYAPP.PAS The fast way to incorporate TVToys in your own app.
HELPFILE.PAS Improved HelpFile with back tracking and external commands
HELPTEST.PAS Demonstration of HelpFile
HELPCTX.PAS Help contexts generated by TVHC
HELPTEST.HLP Demo Help text compiled with TVHC
HELPTEST.TXT The Help text source
VIDEO.PAS A unit supporting extended video mode setting and searching
MODEDLG.PAS Dialog for presenting and selecting video modes
TVVIDEO.PAS TV support for all the new video modes
VIDEOTST.PAS Demonstration of Video, ModeDlg and TVVideo
IMPRTANT.PAS Warning dialog used by VideoTst
FONTFILE.PAS Custom font file loading and storing
FONTDLG.PAS Custom font file selection dialog
CHIC12.COM Very nice font to get you going!
DBLSTR.PAS Special string class used by font file selection listbox
COLORBOX.PAS Color selection box with a twist
PAL.PAS EGA/VGA palette handling
TVPAL.PAS TV palette changing dialog
SCROLL.PAS Scrollbar with instantanious dragging updates
RESTEST.PAS Demonstrates streams, resource fonts, safer video detection
CHECKVT.PAS Automatic video detection choice dialog
NEWMOUSE.PAS Snap in replacement mouse cursor for extended video modes
COLORTXT.PAS Enhanced static texts with color. Mini shadows
EXESTRM.PAS Stream that reads resources from your EXE
TOYCFG.PAS Your personal code preferences file
TOYPREFS.PAS Your personal constants preferences file
TOYUTILS.PAS Odd Pascal code, hex conversion, file and string stuff
TVUTILS.PAS Odd TV bits, validators and routines
STRMREC.PAS All the stream records in one unit
DPMI.PAS DPMI assembler programming simplification code
VESA.PAS VESA support routines
TIP.TXT Assortment of unrelated information.
README.TXT This text.
Instructions ▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
There are two demo programs, VIDEOTST and HELPTEST. All you have to do
is compile and run them for a quick demonstration. There is also a
RESTEST program demonstrating some advanced TVToys programming.
If you are upgrading from a previous version, check the Changes and
Porting sections in this file. All conditionals controlling conditional
compilation are now gathered in one central file called TOYCFG.PAS,
which you should edit to your liking. TOYAPP makes it easy to add TVToys
to your own programs.
If your mouse behaves oddly at times when running VIDEOTST, try
defining UseNewMouse in TOYCFG. (The mouse cursor jumps around when
you change video modes, but that's because the cursor stays at the same
position relative to the upper left corner)
If you use VIEWS.TPU/TPP as shipped by Borland, you can try to define
Color before compiling and running VIDEOTST.PAS. This spiffs up the Info
Dialog and demonstrates ColorTxt.
Conventions: The file TOYAPP contains the unit toyApp which
defines the object (class) TToyApp. Files are .PAS
if nothing else is stated. A "section" is a part of
this file, having the section name for header.
Read the header in each source file to get more information,
VIDEOTST.PAS especially.
Porting ▄
▀▀▀▀▀▀▀▀▀▀▀▀
News flash: TVTOYS DOES NOT SUPPORT smFont8x8 and smSpecialFont8x8,
MAKE SURE YOU REMOVE all such references. There is a ToggleVideoLines
function instead. smFont8x8 loses its use with all the new video modes.
You have to EXPLICITLY set the VideoModeChanged pointer to a font and
palette reloading procedure, see the VideoModeChanged section.
I am pro choice, which means that I try to give you the choice of using
a certain feature or not. This means that you have to do some editing to
incorporate the code in your own apps. TToyApp is an attempt at easing
the pains for you.
If you use TToyApp, you are stuck with the HelpFile and most of the
video code. Even if your application doesn't use Help, ALL the Help code
will be compiled into the application.
I believe in making TToyApp provide basic services, and the application
itself handling menu choices etc, but it gets tedious copying so I
decided to burn some things into TToyApp anyway.
The way I see it, you have to copy some of the HandleEvent from VideoTst
(but you have to edit that code anyway) and create some menus. The menus
include the problem of assigning command values, so I have refrained
from supplying default constructors like StdEditMenuItems. You are
welcome to write your own.
The dialogs now all have help contexts. By default, dummy values from
TOYPREFS are used. You should supply your own help context file whose
name must match that in HCFILE.PAS, or edit HCFILE. You don't have to
define all contexts at once, TOYPREFS will cover the ones missing. Make
sure you use toyPrefs BEFORE your HelpCtx file (unit X; uses toyPrefs,
MyHelpCtx, ...). You might have to rebuild sometimes. See HELPTEST.TXT
for a list of help contexts. Also notice that hcDosShell is defined in
Borland's APP unit, which easily leads to conflicts. Make sure your own
help context file is used after any other file defining help contexts.
Suggestions ▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Copy TOYCFG to your project directory and edit to your liking if a
project calls for a different setup than you'd normally use.
Put toyPrefs very early in all uses lists, or your help context
values will be zero. Notice how toy